import tkinter as tk
from tkinter import ttk

# root = tk.Tk()
# root.geometry('300x300')
# rounded_button = tk.Label(root, text="圆", borderwidth=0, relief=tk.SOLID, width=5,padx=10, pady=5)
# rounded_button.pack()


# style = ttk.Style()
#
# style.configure('RoundedButton.TButton',    # 风格名
#                 background='blue',              # 背景色
#                 # foreground='white',             # 前景色
#                 font=('Arial', 12, 'bold'),
#                 borderwidth=0,
#                 relief=tk.SOLID)
#
# rounded_button = ttk.Button(root, text="圆角按钮", style='RoundedButton.TButton')
# rounded_button.pack()
# root.mainloop()


import tkinter as tk
from tkinter import ttk

root = tk.Tk()

style = ttk.Style()
style.configure('Rounded.TButton', borderwidth=1, relief='solid', radius=10)

button = ttk.Button(root, text='Click me!', style='Rounded.TButton')
button.pack(padx=10, pady=10)

root.mainloop()